import {
	createStore
} from 'vuex';

export default createStore({
	state: {
		// 加油站列表
		stationList: [],
		// 当前选择的加油站id
		areaId: '',
		// 当前加油站名称
		areaText: ''
	},
	getters: {},
	mutations: {
		// 设置加油站列表
		setStation: (state, list) => {
			state.stationList = list;
		},
		// 设置当前选择的加油站id
		setAreaId: (state, id) => {
			state.areaId = id
		},
		// 设置当前选择的加油站名称
		setAreaText: (state, text) => {
			state.areaText = text
		}
	},
	actions: {}
})